//
// Right side toc
//
.td-sidebar-toc {
	padding-top: 5.3rem;
	border-left: 1px solid $border-color;

	@supports (position: sticky) {
		position: sticky;
		top: 4rem;
		height: calc(100vh - 6rem);
		overflow-y: auto;
	}

	order: 2;
	padding-bottom: 1.5rem;
	vertical-align: top;
}

.td-page-meta {
	a {
		display: block;
		margin-bottom: 1rem;
		letter-spacing: 0.02em;
		font-weight: 500;
	}
}

.td-toc {
	a {
		display: block;
		font-weight: $font-weight-light;
		padding-bottom: 0.25rem;
	}

	li {
		list-style: none;
		display: block;
	}

	li li {
		margin-left: 0.5rem;
	}

	#TableOfContents {
		a {
			color: $gray-600;

			&:hover {
				color: $blue;
				text-decoration: none;
			}
		}
	}

	ul {
		padding-left: 0;
	}
}

#TableOfContents {
	a {
		font-weight: 400;
		color: unset;
	}

	// reset all ul.
	ul {
		margin-block-start: 0;
		margin-block-end: 0;
		margin-inline-start: 0;
		margin-inline-end: 0;
		padding-inline-start: 0;
	}
	> ul {
		margin-bottom: 0;
		list-style: none;
		margin-left: 0.5rem !important;
		> li:first-child > ul {
			list-style-type: none;
		}

		// hides subheadings from TOC
		ul {
			display: none;
		}

		li {
			margin: 1em 0;
		}
	}
}

div.toc-header {
	font-weight: 700;
	letter-spacing: 0.02em;
}
